package dbutils02;

import dbutils01.JDBCUtils;
import org.apache.commons.dbutils.DbUtils;
import org.apache.commons.dbutils.QueryRunner;
import org.junit.Test;

import java.sql.Connection;

public class DBUtilsDemo01 {
    @Test
    public void testInert()throws Exception{
        QueryRunner qr = new QueryRunner();
        Connection conn = JDBCUtils.getConnection();
        int i= qr.update(conn,
                "INSERT  INTO  test.product values (?,?,?)",
                13, "索尼xm5", 1000);
        System.out.println(i);
        DbUtils.closeQuietly(conn);
    }
}
